<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form th:href="@{/findPage(pageIndex=1)}" method="get">
    姓名：
    <input type="text" name="name"  th:value="${studentQ.getName()}">
    <input type="submit" value="查询">
    <a th:href="@{/student/toAdd}">添加</a>
    <table>
        <tr>
            <td>ID</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>地址</td>
        </tr>
        <tr th:each="student:${page.getRecords()}">
            <td th:text="${student.getId()}"></td>
            <td th:text="${student.getName()}"></td>
            <td th:text="${student.getAge()}"></td>
            <td th:text="${student.getAddress()}"></td>
            <td>
                <a th:href="@{/student/findById(id=${student.getId()})}">修改</a>
                <a th:href="@{/student/del(id=${student.getId()})}">删除</a>
            </td>
        </tr>
    </table>
    <a th:href="@{findPage(pageIndex=1)}">首页</a>
    <a th:href="@{findPage(pageIndex=${page.getCurrent()-1})}">上一页</a>
    <a th:href="@{findPage(pageIndex=${page.getCurrent()+1})}">下一页</a>
    <a th:href="@{findPage(pageIndex=${page.getPages()})}">尾页</a>
</form>
</body>
</html>